/*
 * @Description:
 * @Autor: lin
 * @Date: 2023-03-31 16:12:23
 * @LastEditors: lin
 * @LastEditTime: 2023-04-04 19:12:48
 */
import http from '@/utils/http'
// pc获取随机用户数据
export function getRandUserData(params) {
  return http.get('/storage/learnplan/activity_rand_user', params)
}
// 获取学习详情
export function getPlanProfile(params) {
  return http.get('/storage/learnplan/profile', params)
}
// 获取学习进度
export function getPlanDayProgress(params) {
  return http.get('/storage/learnplan/progress', params)
}
// 掌握知识点
export function setKnowlegeKown(params) {
  return http.post('/storage/learnplan/known', params)
}
// 获取配置详情
export function getConfigDetails(params) {
  return http.get('/storage/learnplan/index_config', params)
}
export function getPlanJoinStatus(params) {
  return http.get('/storage/learnplan/learn_plan_join_status', params)
}
// 设置备考的科目
export function setPlanSubject(params) {
  return http.post('/storage/learnplan/set_exam_subject', params)
}
export function getPlanQuestions(params) {
  return http.get('/storage/learnplan/learn_plan_join_status', params)
}
// 获取活动引导页配置信息
export function getPlanConfig(params) {
  return http.get('/storage/learnplan/config', params)
}
// 用户加入打卡计划
export function joinLearnPlan(params) {
  return http.post('/storage/learnplan/join_learn_plan', params)
}
export function submitPlanExam(params) {
  return http.post('/storage/learnplan/progress', params)
}
// //获取某个科目的某天问题列表
// /**
//  *
//  * @param {[string]} subject_ids
//  * @param {[string]} year 比如2020
//  * @param {[int]} subejct_id 科目id
//  * @param {[int]} day 第几天
//  */
// getPlanQuestions(params) {
//   return http.get('/storage/learnplan/questions', params).then(res => {
//     let knowledges = res.knowledges
//     res = formatPlanExamData(res)
//     res = parseExamData(res)
//     res.knowledges = knowledges
//     return res
//   })
// },
